package cc.leap.web.monitor;

import cc.leap.model.AjaxResult;
import cc.leap.web.vo.Server;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Get;
import org.noear.solon.annotation.Inject;
import org.noear.solon.annotation.Mapping;

@Controller
@Mapping("/monitor/server")
public class ServerController {

    @SaCheckPermission("monitor:server:list")
    @Get
    @Mapping
    public AjaxResult getInfo() throws Exception {

        Server server = new Server();
        server.copyTo();
        return AjaxResult.success(server);
    }
}
